Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove the disable state from chat input box #1341

Merged

Conversation

kang-square
Copy link
Contributor

@kang-square kang-square commented Feb 22, 2025

This PR is to implement the feature mentioned in this issue.
I remove the disable state from the chat input box, while the Goose is generating.
The Enter shortcut to submit is still disabled when Goose is generating.

Screen.Recording.2025-02-22.at.12.42.08.AM-1.mov

@kang-square kang-square changed the title remove the disable state feat: remove the disable state from chat input box Feb 22, 2025
onClick={onStop}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add preventDefault and stopPropagation here, otherwise it triggers a bug when Goose is generating, and there is text in the input box, and you click on the stop button, the text is submitted.
I guess it's because when we clicks on the stop button, the isLoading changes from true to false, and it renders the submit button. When the click event bubble up, its parent element is the form, so it triggers the form submit.

@kang-square kang-square marked this pull request as ready for review February 22, 2025 05:47
@wendytang wendytang requested a review from lily-de February 24, 2025 21:13
Copy link
Collaborator

@baxen baxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

@baxen baxen merged commit 234d55e into block:main Feb 27, 2025
6 checks passed
salman1993 added a commit that referenced this pull request Feb 27, 2025
* origin/main: (26 commits)
  feat: Read .gooseignore to Restrict access to files or Directories (#1199)
  docs: adding update command to cli command guide (#1411)
  docs: Adding YT short for Computer Controller Tutorial (#1420)
  feat(cli): support arbitrary path for sessions (#1414)
  feat: remove the disable state from chat input box (#1341)
  feat: Add extra details to prompt for gui (#1387)
  style: added launch text and styling (#1406)
  fix(docs): update default session location (#1412)
  feat: moved extension add button and updated label (#1408)
  draft: use rust messages in typescript (#1393)
  fix: detect read only tool when only mode is approve (#1398)
  docs: Add Puppeteer Extension Tutorial (#1396)
  chore(release): release version v1.0.10 (#1404)
  chore(release): release 1.10.0  (#1385)
  feat: wip on ConfigProvider and integration in settings_v2 (#1395)
  feat: Add command `goose update` to update goose CLI version (#1308)
  fix: update approve prompt (#1383)
  feat: interactive after run (#1377)
  docs: Tutorial extension (#1379)
  feat: allow setting openai base path (#1369)
  ...
kalvinnchau added a commit that referenced this pull request Feb 27, 2025
* main:
  feat: allow user to turn off smart approve (#1407)
  feat: Read .gooseignore to Restrict access to files or Directories (#1199)
  docs: adding update command to cli command guide (#1411)
  docs: Adding YT short for Computer Controller Tutorial (#1420)
  feat(cli): support arbitrary path for sessions (#1414)
  feat: remove the disable state from chat input box (#1341)
  feat: Add extra details to prompt for gui (#1387)
  style: added launch text and styling (#1406)
  fix(docs): update default session location (#1412)
  feat: moved extension add button and updated label (#1408)
  draft: use rust messages in typescript (#1393)
  fix: detect read only tool when only mode is approve (#1398)
  docs: Add Puppeteer Extension Tutorial (#1396)
  chore(release): release version v1.0.10 (#1404)
  chore(release): release 1.10.0  (#1385)
  feat: wip on ConfigProvider and integration in settings_v2 (#1395)
  feat: Add command `goose update` to update goose CLI version (#1308)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants